// pages/listen/listen.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    swiperCurrent: "",  //指示点
    //轮播图
    turnImg: ['../../images/materials/数字DIY年画1.jpg','https://img.zcool.cn/community/01572255491c7b0000019ae99caa14.jpg@1280w_1l_2o_100sh.jpg', 'https://i03piccdn.sogoucdn.com/535c9b1f8e93b99d', '../../images/materials/石膏娃娃1.jpg'],
    turnText: ['数字DIY年画填涂小游戏', '年画元素自由拼装活动', '开展线下年画填图活动', '石膏娃娃上色活动'],
    gameList:[{
      imgSrc:"../../images/icon/game1.png",
      title:"DIY年画"
    },{
      imgSrc:"../../images/icon/game2.png",
      title:"趣味问答"
    },{
      imgSrc:"../../images/icon/game3.png",
      title:"连连看"
    },{
      imgSrc:"../../images/icon/game4.png",
      title:"创意T恤"
    },{
      imgSrc:"../../images/icon/game5.png",
      title:"待开发"
    }
  ],
  activityList:[{
    imgSrc:"http://m.tuniucdn.com/filebroker/cdn/snc/18/fe/18fe3476fded6672125257805c0ad6a5_w800_h0_c0_t0.jpg",
    title:"绘制年画"
  },{
    // imgSrc:"https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2023%2F1219%2F6bab1e75j00s5vyw400l4d200dt00ifg008u00bs.jpg&thumbnail=660x2147483647&quality=80&type=jpg",
    imgSrc:"../../images/materials/石膏娃娃1.jpg",
    title:"石膏娃娃"
  },{
    imgSrc:"https://a.vpimg3.com/upload/merchandise/183029/SWSPORT-151259N0001-15.jpg",
    title:"T恤DIY"
  }]
  },
  //swiper滑动事件
  swiperChange: function (e) {  //指示图标
    this.setData({
      swiperCurrent: e.detail.current
    })
  },
  tabNav(e) {
    let currentTab = e.currentTarget.dataset.current
    this.setData({
      currentTab
    })
  },
  changeNav(e) {
    let {current,source} = e.detail
    if (source === 'autoplay' || source === 'touch') {
      const currentTab = current
      this.setData({
        currentTab
      })
    }
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})